<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="_fragments::head(~{::title})">
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>归档</title>

  <link rel="stylesheet" href="../static/css/main.css">
  <link href="https://cdn.bootcss.com/semantic-ui/2.4.1/semantic.min.css" rel="stylesheet">
</head>
<body>
<!--顶部导航-->
<header th:replace="_fragments::header(4)" class="ui inverted attached segment m-shadow-small">
  <div class="ui container">
    <nav class="ui inverted secondary stackable menu">
      <h2 class="ui header teal item m-header-logo">Blog</h2>
      <a href="#" class="m-header-item m-hide-on-mobile item"><i class="small home icon"></i> 首页</a>
      <a href="#" class="m-header-item m-hide-on-mobile item"><i class="small idea icon"></i> 分类</a>
      <a href="#" class="m-header-item m-hide-on-mobile item"><i class="small tag icon"></i> 标签</a>
      <a href="#" class="active m-header-item m-hide-on-mobile item"><i class="small clone icon"></i> 归档</a>
      <a href="#" class="m-header-item m-hide-on-mobile item"><i class="small info icon"></i> 关于我</a>
      <div class="right item m-header-item m-hide-on-mobile">
        <div class="ui icon inverted transparent input">
          <input type="text" placeholder="Search...">
          <i class="search link icon"></i>
        </div>
      </div>
    </nav>
  </div>

  <a href="#" class="ui black icon button m-header-toggle-icon m-show-on-mobile toggle">
    <i class="sidebar icon"></i>
  </a>
</header>

<!--中间内容-->
<section class="m-article-container m-padding-tb-large">
  <div class="ui container">
    <!--header-->
    <div class="ui padded top attached segment">
      <div class="ui middle aligned two column grid">
        <div class="column">
          <h3 class="ui teal header">归档</h3>
        </div>
        <div class="right aligned column m-text-thin">
          共 <h3 class="ui orange header m-inline-block" th:text="${articleCount}">214</h3> 篇
        </div>
      </div>
    </div>

    <th:block th:each="item : ${archiveMap}">
      <h3 class="ui center aligned header" th:text="${item.key}">2019</h3>
      <div class="ui fluid vertical menu">
        <a href="#" class="item" target="_blank" th:each="article : ${item.value}"
           th:href="@{/blog/{id}(id=${article.id})}">
                <span>
                    <i class="small teal circle icon"></i><span th:text="${article.title}">关于刻意练习的清单</span>
                    <span class="ui teal basic left pointing label m-padding-mini"
                          th:text="${#dates.format(article.updateTime, 'M月d日')}">2月25日</span>
                </span>
          <span class="ui orange basic left pointing label m-padding-mini" th:text="${article.flag}">原创</span>
        </a>
      </div>
    </th:block>
  </div>
</section>

<!--footer-->
<footer th:replace="_fragments::footer" class="ui vertical inverted segment m-footer">
  <div class="ui container center aligned">
    <div class="ui stackable grid divided inverted">
      <!--二维码-->
      <div class="three wide column">
        <div class="ui inverted link list">
          <div class="item">
            <img src="https://via.placeholder.com/110?text=WeChat" class="ui rounded image" alt="">
          </div>
        </div>
      </div>
      <!--二维码-->

      <!--最新博客-->
      <div class="three wide column">
        <h4 class="ui inverted header m-text-thin m-text-spacing">最新博客</h4>
        <div class="ui inverted link list">
          <a href="#" class="item">用户故事 (User Story)</a>
          <a href="#" class="item">用户故事 (User Story)</a>
          <a href="#" class="item">用户故事 (User Story)</a>
        </div>
      </div>
      <!--最新博客-->

      <!--联系我-->
      <div class="three wide column">
        <h4 class="ui inverted header m-text-thin m-text-spacing">联系我</h4>
        <div class="ui inverted link list">
          <a href="#" class="item">Email:</a>
          <a href="#" class="item">QQ:</a>
        </div>
      </div>
      <!--联系我-->

      <!--关于-->
      <div class="seven wide column">
        <h4 class="ui inverted header m-text-thin m-text-spacing">关于</h4>
        <p class="m-text-thin m-text-spacing m-opacity-80">這是我的個人博客</p>
      </div>
      <!--关于-->

    </div>
    <div class="ui inverted section divider"></div>
    <p class="m-text-thin m-text-spacing m-opacity-60">by Misty</p>
  </div>
</footer>

<!--/*/ <th:block th:replace="_fragments::scripts"> /*/-->
<script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/semantic-ui/2.4.1/semantic.min.js"></script>
<!--/*/ </th:block> /*/-->
<script>
    $("header > a.toggle.button").click(function () {
        $(".m-header-item").toggleClass('m-hide-on-mobile');
        return false
    });
</script>
</body>
</html>